import request from "@/utils/request";

// 店铺审核
export function mallStoreVerify(query) {
  return request({
    url: "/mall/mallStore/verify",
    method: "get",
    params: query,
  });
}

// 查询店铺列表
export function listMallStore(query) {
  return request({
    url: "/mall/mallStore/list",
    method: "get",
    params: query,
  });
}

// 查询店铺详细
export function getMallStore(id) {
  return request({
    url: "/mall/mallStore/" + id,
    method: "get",
  });
}

// 新增店铺
export function addMallStore(data) {
  return request({
    url: "/mall/mallStore",
    method: "post",
    data: data,
  });
}

// 修改店铺
export function updateMallStore(data) {
  return request({
    url: "/mall/mallStore",
    method: "put",
    data: data,
  });
}

// 删除店铺
export function delMallStore(id) {
  return request({
    url: "/mall/mallStore/" + id,
    method: "delete",
  });
}

// 申请分账
export function addApplication(data) {
  return request({
    url: "/mall/mallStore/openApplication",
    method: "post",
    data: data,
  });
}

// 分账绑定
export function applyBind(maxRate, data) {
  return request({
    url: "/mall/mallStore/applyBind?maxRate=" + maxRate,
    method: "post",
    data,
  });
}